package com.psytech.app.task.web_ui.shared;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class UiTask implements Serializable {

	private static final long serialVersionUID = 2536605553666596892L;

	private String uid;

	private String name;

	private String description;

	private PRIORITY priority;

	private STATUS status;

	private Date expectedEndDate;

	private UIUser creator;

	private Date expectedStartDate;

	private Date realEndDate;

	private List<UIUser> affectedUsers;

	private String project;

	public static enum PRIORITY {
		LOW, MEDIUM, HIGH
	}

	public static enum STATUS {
		PENDING, PROGRESS, COMPLETE
	}

	/**
	 * @return identifiant unique de la tâche.
	 */
	public String getUid() {
		return this.uid;
	}

	/**
	 * @see #getUid()
	 */
	public void setUid(final String uid) {
		this.uid = uid;
	}

	/**
	 * @return Nom donné à la tâche.
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * @see #getName()
	 */
	public void setName(final String value) {
		this.name = value;
	}

	/**
	 * @return Description complete de la tâche.
	 */
	public String getDescription() {
		return this.description;
	}

	/**
	 * @see #getDescription()
	 */
	public void setDescription(final String value) {
		this.description = value;
	}

	/**
	 * @return Priorité donnée à la tâche.
	 */
	public PRIORITY getPriority() {
		return this.priority;
	}

	/**
	 * @see #getPriority()
	 */
	public void setPriority(final PRIORITY value) {
		this.priority = value;
	}

	/**
	 * @return Etat actuel de la tâche.
	 */
	public STATUS getStatus() {
		return this.status;
	}

	/**
	 * @see #getStatus()
	 */
	public void setStatus(final STATUS value) {
		this.status = value;
	}

	/**
	 * @return Date de fin souhaitée
	 */
	public Date getExpectedEndDate() {
		return this.expectedEndDate;
	}

	/**
	 * @see #getExpectedEndDate()
	 */
	public void setExpectedEndDate(final Date value) {
		this.expectedEndDate = value;
	}

	/**
	 * @return Créateur de la tâche
	 */
	public UIUser getCreator() {
		return this.creator;
	}

	/**
	 * @see #getCreator()
	 */
	public void setCreator(final UIUser creator) {
		this.creator = creator;
	}

	/**
	 * @return Date de début souhaitée.
	 */
	public Date getExpectedStartDate() {
		return this.expectedStartDate;
	}

	/**
	 * @see #getExpectedStartDate()
	 */
	public void setExpectedStartDate(final Date expectedStartDate) {
		this.expectedStartDate = expectedStartDate;
	}

	/**
	 * @return Date de fin effective
	 */
	public Date getRealEndDate() {
		return this.realEndDate;
	}

	/**
	 * @return La liste des utilisateurs affectés
	 */
	public List<UIUser> getAffectedUsers() {
		if (this.affectedUsers == null) {
			this.affectedUsers = new ArrayList<UIUser>();
		}
		return this.affectedUsers;
	}

}
